<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

?>
<?php use_stylesheet('/sfPropelPlugin/css/global.css') ?>
<?php use_stylesheet('/sfPropelPlugin/css/default.css') ?>
<?php use_helper('Form')?>


<div id="sf_admin_container">
     <div> <h2>Datos de la Cuenta Corriente del Cliente</h2></div>
   
        <table width="380">
        <tr>
            <th width="100">Cliente:</th>
            <td><?php echo $clientes->__toString()?></td>
        </tr>
        <tr>
            <th>R.U.C</th>
            <td><?php echo $clientes->getRuc()?></td>
        </tr>
        <tr>
            <th>Dirección</th>
            <td><?php echo $clientes->getDireccion()?></td>
        </tr>
        <tr>
            <th>Telefono</th>
            <td><?php echo $clientes->gettelefonoparticular()?></td>
        </tr>
        <tr>
            <th>Otra Info</th>
            <td><?php echo $clientes->getOtrainfo()?></td>
        </tr>
    </table>   



<table>
    <thead>    
    <th>FACTURA Nro:</th>
    <th>IMPORTE</th>
    <th>SALDO</th>
    <th>VER PAGOS</th>
    <th>NUEVO PAGO</th>
    </thead>
    <tbody>
        <?php foreach($facturas as $factura):?>
        <tr>
        <td><?php echo $factura->getNumeroDeComprobante()?></td>
        <td><?php echo $factura->getTotal()?></td>
        
        <td><?php echo $factura->getTotal() - $factura->getTotalPagado() ?></td>
        <td><?php echo button_to('Ver Pagos', 'facturas/listDetpagos?id='.$factura->getId())?></td>
        <td><?php echo button_to('Nuevo Pago', 'facturas/ListPago?id='.$factura->getId())?></td>
        </tr>
                <?php endforeach;?>
        
    </tbody>
</table>
</div>
